import React, {Component} from "react"
import {View,Text,StyleSheet} from "react-native";
import {connect} from "react-redux";
interface IProps{
    height?:number|string,
    bgColor?:string
}
/**
 * @Author Training
 * @Desc 一个占位框组件
 */

class Placeholder extends Component<IProps>{
    static defaultProps={
        height:10,
        bgColor:"#eee"
    };
    constructor(props: IProps | Readonly<IProps>){
        super(props);

    }

    render():any{
        let {height,bgColor} = this.props;
        return (<View style={[styles.placeholder, {height: height, backgroundColor: bgColor}]}/>);
    }
}

const styles = StyleSheet.create({
    placeholder:{

    }
})
const mapStateToProps = (state:any) => ({

});
const mapDispatchToProps = (dispatch:any) => ({

});
export default connect(mapStateToProps,mapDispatchToProps)(Placeholder)
